<template>
  <div style="margin-top: 30px;">

    <!--角色列表-->
    <el-row>
      <el-col :span="24" :offset="0" style="margin-top:30px;">

        <el-row :gutter="0" style="border: 1px solid white">
          <el-col :span="7" :offset="0" style="">
            <el-input placeholder="科室名称" v-model="searchValue" class="">
              <el-button slot="append" icon="el-icon-search" @click="querySubmit"></el-button>
            </el-input>
          </el-col>

          <el-col :span="2" :offset="15" style="">
            <el-button type="success" style="float: right" @click="addFun2">新增</el-button>
          </el-col>
        </el-row>


        <el-row :gutter="0" style="margin-top:20px;border: 1px solid white">
          <el-col :span="24" :offset="0" >
            <el-table stripe :data="tableData1" :header-cell-style="{lineHeight:'20px'}" style="width: 100%"><!--height="840"-->
              <el-table-column fixed prop="prop0" label="序号"></el-table-column>
              <el-table-column prop="prop1" label="科室编号"></el-table-column>
              <el-table-column prop="prop2" label="科室名称"></el-table-column>
              <el-table-column prop="prop3" label="科室简介"></el-table-column>
              <el-table-column prop="prop4" label="创建时间"></el-table-column>
              <el-table-column prop="prop5" label="创建人员"></el-table-column>
              <el-table-column fixed="right" label="操作" width="150">
                <template slot-scope="scope">
                  <el-button type="text" size="small">编辑</el-button>
                  <el-button type="text" size="small" @click="handleClick(scope.row)">删除</el-button>
                </template>
              </el-table-column>
            </el-table>

          </el-col>
        </el-row>

      </el-col>
    </el-row>

  </div>
</template>

<script>
    export default {
      name: "employee3",
      data() {
        const item = {
          prop0: 1,
          prop1: '104',
          prop2: '内科',
          prop3: '所有身体内部的病症都可以解决',
          prop4: '2019-11-12 12:08:12',
          prop5: '王冕'
        };
        return {
          tableData1: Array(7).fill(item),
          searchValue: ''
        }
      },
      methods: {
        handleClick(row) {
          console.log(row);
        },
        querySubmit() {
          console.log('submit!');
        },
        addFun2:function () {
          this.$router.push("/employeeInsert2")
        }
      }
    }
</script>

<style scoped>

</style>
